#include "begin.h"
#include "ui_begin.h"
#include "mainwindow.h"
#include <QTimer>
begin::begin(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::begin)
{

    ui->setupUi(this);
}

begin::~begin()
{
    delete ui;
}

void begin::on_pushButton_2_clicked() //关闭窗口，结束程序
{
    this->close();
}

void begin::on_pushButton_clicked()  //开始游戏，跳转到游戏界面
{
    this->close();
    ma=new MainWindow();
    ma->resize(900,600);  //设置大小
    ma->setWindowTitle(QString("Lets Hit!"));
    ma->chushihua();//初始化界面
    ma->suijinum();
    ma->show();
}
